<?php
/**
 * Tableless Layout for accmontreal template
 * @link   http://dokuwiki.org/templates
 * @author Andreas Gohr <andi@splitbrain.org>
 * @author Stephane Chamberland <dokuwiki@meteokid.ca>
 */

// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
@require_once(dirname(__FILE__).'/accmontreal_tpl.class.php');
$accmtl_tpl = new Accmontreal_tpl('menu',true,$ID);
@include(dirname(__FILE__).'/lang/'.$conf['lang'].'/lang.php');
@setcookie('lang',$conf['lang'],time()+3600*24*30,'/');
$_SESSION['lang'] = $conf['lang'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
 lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction']?>">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>
    <?php tpl_pagetitle()?>
    [<?php echo strip_tags($conf['title'])?>]
  </title>

  <?php tpl_metaheaders()?>

  <link rel="shortcut icon" href="<?php echo DOKU_TPL?>images/favicon.ico" />
  
  <link href="http://www.google.com/uds/css/gsearch.css" type="text/css" rel="stylesheet"/>
  <script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;&hl=<?php echo $conf['lang'];?>&amp;key=ABQIAAAAuzmfosIDoSalMValKw5T_hQuVzGYUACAO8VLciVEaEvIDOI23RQfhTOq-uNxJAvw-vLzXLvPVBkBAw" type="text/javascript"></script>
  <script src="<?php echo DOKU_TPL; ?>mygsearch.js" type="text/javascript"></script>

  <?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?>
</head>

<body>
<?php /*old includehook*/ @include(dirname(__FILE__).'/topheader.html')?>

<div class="containertop">
<?php 
$accmtl_tpl->echo_lang_switch_link($ID);
if ($conf['lang'] == 'fr') {
	$lang['topabout'] = 'A Notre Sujet';
	$lang['topcontact'] = 'Contactez-Nous';
} else {
	$lang['topabout'] = 'About';
	$lang['topcontact'] = 'Contact Us';
}
tpl_link(wl(':'.$conf['lang'].':about:home'),$lang['topabout']);
tpl_link(wl(':'.$conf['lang'].':about:contacts:home'),$lang['topcontact']);
?>
</div>
<div class="container">

<div class="dokuwiki">
  <?php html_msgarea()?>

  <div class="stylehead">

    <div class="header">
      <!--
      <div class="pagename">
        [[<?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true),'title="'.$lang['btn_backlink'].'"')?>]]
      </div>
      -->
      <div class="logo">
         <a href="<?php echo DOKU_BASE; ?>" title="ACC Logo"><img src="<?php echo DOKU_TPL; ?>images/accgraphic.gif" alt="ACC Logo" /></a> 
        <h1><?php tpl_link(wl(),$conf['title'],'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[H]"')?></h1>
        <!-- <h2><?php tpl_link(wl(),$conf['subtitle'],'')?></h2> -->
      </div>

      <div class="clearer"></div>
    </div>

    <?php /*old includehook*/ @include(dirname(__FILE__).'/header.html')?>

    <div class="bar" id="bar__top">
      <div class="bar-left" id="bar__topleft">
      </div>

      <div class="bar-right" id="bar__topright">
        <!-- <p id="langswitch"><?php $accmtl_tpl->echo_lang_switch_link($ID);?></p> -->
        <h2 class="subtitle"><?php echo $conf['subtitle'];?></h2>
        <div id="searchbox">
<noscript>
<form method="get" action="http://www.google.com/custom" class="search" id="search">
<p>
<input type="text" id="qsearch_in" accesskey="f" name="q" class="edit" />
<input type="submit" value="Search" class="button" />
<input type="hidden" name="cof" value="LW:115;L:http://www.accmontreal.ca/_lib/img/accgraphic.gif;LH:131;AH:left;AWFID:81c79eaa4a6a4ecb;" />
<input type="hidden" name="domains" value="www.accmontreal.ca" />
<input type="hidden" name="sitesearch" value="www.accmontreal.ca" checked="checked" />
</p>
</form>
</noscript>
        </div><!-- searchbox -->
      </div>

      <div class="clearer"></div>
    </div>

<?php
    //if($ID==$conf['lang'].':'.$conf['start']){
    //    $accmtl_tpl->show_topbar(1);
    //} else {
        $accmtl_tpl->show_topbar();
    //}
?>

    <?php if($conf['breadcrumbs']){?>
    <div class="breadcrumbs">
      <?php tpl_breadcrumbs()?>
      <?php //tpl_youarehere() //(some people prefer this)?>
    </div>
    <?php }?>

    <?php if($conf['youarehere']){?>
    <div class="breadcrumbs">
      <?php $accmtl_tpl->tpl_youarehere2() ?>
    </div>
    <?php }?>

  </div>
  <?php flush()?>

  <?php /*old includehook*/ @include(dirname(__FILE__).'/pageheader.html')?>

  <div class="page">
   <div id="search_results"></div>
   <!-- wikipage start -->
    <?php tpl_content()?>
    <!-- wikipage stop -->
  </div>

  <div class="clearer">&nbsp;</div>

  <?php flush()?>
      <?php $accmtl_tpl->show_menu_foot();?>

  <div class="stylefoot">

    <div class="meta">
      <div class="user">
        <?php tpl_userinfo()?>
      </div>
      <div class="doc">
        <?php tpl_pageinfo()?>
      </div>
    </div>

   <?php /*old includehook*/ @include(dirname(__FILE__).'/pagefooter.html')?>

    <?php if($conf['useacl'] && $_SERVER['REMOTE_USER'])  { ?>
    <div class="bar" id="bar__bottom">
      <div class="bar-left" id="bar__bottomleft">
        <?php tpl_button('edit')?>
        <?php tpl_button('history')?>
        <?php tpl_button('recent')?>
      </div>
      <div class="bar-right" id="bar__bottomright">
        <?php tpl_button('subscribe')?>
        <?php tpl_button('subscribens')?>
        <?php tpl_button('admin')?>
        <?php tpl_button('profile')?>
        <?php tpl_button('login')?>
        <?php tpl_button('index')?>
        <?php tpl_button('top')?>&nbsp;
      </div>
      <div class="clearer"></div>
    </div>
    <?php } ?>
    
  </div>


</div>
<?php /*old includehook*/ @include(dirname(__FILE__).'/footer.html')?>

<div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug()?></div></div>
</body>
</html>
